#include<iostream>
using namespace std;
int num[100];
int fun(int front,int rear,int air){
    int mid;
    while(front<=rear){
        mid=(front+rear)/2;
        if(num[mid]<air)front=mid+1;
        else if(num[mid]>air)rear=mid-1;
        else if(num[mid]==air)return mid;
    }
    return -1;
}
int main(){
    for(int i=0;i<100;i++)
        num[i]=i;
    int index=fun(0,100,99);
    if(index!=-1)cout<<"99的下标为："<<index<<endl;
    else cout<<"没找到！"<<endl;
    return 0;
}